]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Add a null-check for the scrollview's fade ClutterEffect
authorMario Sanchez Prada <mario@endlessm.com>
Thu, 15 Jun 2017 11:43:58 +0000 (12:43 +0100)
committerMario Sanchez Prada <mario@endlessm.com>
Thu, 15 Jun 2017 14:01:51 +0000 (15:01 +0100)
This effect will only be created when the StScrollView actor has either
a non-zero vertical or horizontal fade offset defined, so we need to
add a null-check in these two cases before assuming it's there.

https://bugzilla.gnome.org/show_bug.cgi?id=783823

js/ui/appDisplay.js

index 7ebd968d82d68dedaa54d7fce810c4d476d67cc9..c9541b479513cc6d2b2b2e588dbe152237bdd722 100644 (file)
@@ -447,7 +447,10 @@ const AllView = new Lang.Class({
             }));
         this._grid.connect('space-opened', Lang.bind(this,
             function() {
-                this._scrollView.get_effect('fade').enabled = false;
+                let fadeEffect = this._scrollView.get_effect('fade');
+                if (fadeEffect)
+                    fadeEffect.enabled = false;
+
                 this.emit('space-ready');
             }));
         this._grid.connect('space-closed', Lang.bind(this,
@@ -658,7 +661,11 @@ const AllView = new Lang.Class({
 
     _closeSpaceForPopup: function() {
         this._updateIconOpacities(false);
-        this._scrollView.get_effect('fade').enabled = true;
+
+        let fadeEffect = this._scrollView.get_effect('fade');
+        if (fadeEffect)
+            fadeEffect.enabled = true;
+
         this._grid.closeExtraSpace();
     },